package com.itaem.community.modules.infrastructure.user.service.remote;

import com.dtflys.forest.annotation.DataVariable;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.http.ForestResponse;
import com.itaem.community.modules.infrastructure.user.dto.UserIdCardAuthenticationResultDTO;

/**
 * <p>项目名称: community </p>
 * <p>文件名称: UserAuthService </p>
 * <p>描述: [类型描述] </p>
 * <p>创建时间: 2020/11/16 </p>
 * <p>作者信息: tomato</p>
 *
 * @author tomato
 * @version v1.0
 */
public interface UserAuthService {

    /**
     * 用户实名认证云API调用接口
     *
     * @param cardNo 身份证号码
     * @param realName 真实姓名
     * @return 验证结果
     */
    @Post(
            url = "${baseUrl}?idcard=${idCard}&name=${realName}",
            headers = {
                    "Authorization:${appCode}"
            }
    )
    ForestResponse<UserIdCardAuthenticationResultDTO> tryAuthenticate(
            @DataVariable("idCard") String cardNo,
            @DataVariable("realName") String realName
    );
}
